<%@ page import="br.edu.ufam.avaliacao.Avaliacao" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
    <title><g:message code="default.list.label" args="[entityName]" /></title>
  </head>
  <body>
    <div class="body" style="width: 1000px">
      <h1><g:message code="Avaliacoes de ${cursoName}"  /></h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <div class="list" >
        <g:form action="filter1" >
          <table>
            <thead>
              <tr >
            <g:sortableColumn property="dateStart" title="${message(code: '#', default: '#')}" />

            <g:sortableColumn property="dateEnd" title="${message(code: 'avaliacao.dateEnd.label', default: 'Data')}" />

            <g:sortableColumn property="conceitoFinal" title="${message(code: 'avaliacao.conceitoFinal.label', default: 'Conceito Final')}" /> 

            <g:sortableColumn property="conceitoDimensao1" title="${message(code: 'avaliacao.conceitoDimensao1.label', default: ' ')}" />

            <g:sortableColumn property="conceitoDimensao1" title="${message(code: 'avaliacao.conceitoDimensao1.label', default: 'Conceito Dimensao 1')}" />

            <g:sortableColumn property="conceitoDimensao2" title="${message(code: 'avaliacao.conceitoDimensao2.label', default: 'Conceito Dimensao 2')}" /> 

            <g:sortableColumn property="ConceitoDimensao3" title="${message(code: 'avaliacao.conceitoDimensao3.label', default: 'Conceito Dimensao 3  ')}" /> 
            </tr>
            </thead>
            <tbody>

            <g:each in="${avaliacaoList}" status="i" var="avaliacaoInstance">
              <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                <td><g:checkBox name="avaliacaoInstance.id" value="${avaliacaoInstance?.id}" checked="false"/></td>
              <td><g:formatDate format="dd/MM/yyyy" ${fieldValue(bean: avaliacaoInstance, field: "dateEnd")}/></td>
              <td>${fieldValue(bean: avaliacaoInstance, field: "conceitoFinal")}<td>
              <td>${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao1")}</td>
              <td>${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao2")}</td>
              <td>${fieldValue(bean: avaliacaoInstance, field: "conceitoDimensao3")}</td>
              </tr>
            </g:each>
            </tbody>
          </table>
      </div>
      <div class="paginateButtons">
        <g:paginate total="${listSize}" next="Próximo" prev="Anterior" />
      </div>
      <div class="buttons" style="alignment-baseline: baseline">
        <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'Gerar Diagnóstico', default: 'Gerar Diagnóstico')}" /></span>
      </div>
    </g:form>
  </div>
</body>
</html>